﻿<UserControl x:Class="Hisaab.Client.Modules.Core.Transaction.View.TransactionView"
	  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Converters="clr-namespace:Hisaab.Client.Modules.Core.Converters" mc:Ignorable="d"
	  d:DesignHeight="373" d:DesignWidth="512" >
    <UserControl.Resources>
        <Converters:TagListToStringConverter  x:Key="TagConverter" />
        <Converters:AccountIdToNameConverter x:Key="AccountNameConverter" />
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="10" />
            <ColumnDefinition Width="250" />
            <ColumnDefinition Width="10*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="34" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="138*" />
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Content="{Binding Title}" Grid.ColumnSpan="4" HorizontalContentAlignment="Center" Style="{DynamicResource Heading1Simple}" />

        <Label Grid.Column="0" Grid.Row="2" Content="details" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="2" Content="{Binding Details}" Style="{DynamicResource Heading2Simple}" />

        <Label Grid.Column="0" Grid.Row="3" Content="amount" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="3" Content="{Binding Amount, StringFormat='{}{0:C}'}" Style="{DynamicResource Heading2Simple}" />

        <Label Grid.Column="0" Grid.Row="4" Content="account" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="4" Content="{Binding Account, Converter={StaticResource AccountNameConverter}}" Style="{DynamicResource Heading2Simple}" />

        <Label Grid.Column="0" Grid.Row="5" Content="date" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="5" Content="{Binding Path=Date, Converter={StaticResource FormatConverter}, ConverterParameter=\{0:dddd MMMM dd\, yyyy\}}" Style="{DynamicResource Heading2Simple}" />

        <Label Grid.Column="0" Grid.Row="6" Content="type" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="6" Content="{Binding TransactionType}" Style="{DynamicResource Heading2Simple}" />

        <Label Grid.Column="0" Grid.Row="7" Content="tags" Style="{DynamicResource Heading2}" />
        <Label Grid.Column="2" Grid.Row="7" Content="{Binding Path=Tags, Converter={StaticResource TagConverter}}" Style="{DynamicResource Heading2Simple}" />
    </Grid>
</UserControl>